package com.ronri.ams;

import android.app.Activity;

import com.ronri.db.DatabaseContext;
import com.ronri.db.LocalDataService;

/**
 * 文件：ams.java
 * 包名：com.ronri.ams;   --- 正式发布时需要修正
 * 说明：轮播组件
 * 作者：MS During
 * 日期：2017/5/15
 * 历史：
 */
public class SystemInit {

    /****
     * 创建数据库
     */
    public static void InitDB(Activity activity)
    {
        DatabaseContext dbContext = new DatabaseContext(activity, "dbdemo");
        LocalDataService localDataService = new LocalDataService(dbContext, "my.db", null, 1);


//        LocalDataService localDataService = new LocalDataService(activity);
//        localDataService.CreateTable("drop table ams_task;");
//        localDataService.CreateTable("drop table ams_samples;");
//
//        localDataService.CreateTable("CREATE TABLE ams_task(id integer primary key autoincrement, name varchar(64), json text);");
//        localDataService.CreateTable("CREATE TABLE ams_samples(id integer primary key autoincrement, task_id integer, name varchar(64), json text)");
    }
}
